class CreateOverviews < ActiveRecord::Migration[5.0]
  def change
    create_table :overviews do |t|
      t.string :report_date, comment: '记录报告日期'
      t.string :company, comment: '集团'
      t.integer :all_stores, comment: '合作门店数'
      t.integer :free_stores, comment: '免费课程门店'
      t.integer :tuition_stores, comment: '收费课程门店'
      t.integer :all_course, comment: '课程数'
      t.integer :all_place, comment: '名额'
      t.integer :free_course, comment: '免费课程数'
      t.integer :free_place, comment: '免费课程数量与名额'
      t.integer :tuition_course, comment: '收费课程数'
      t.integer :tuition_place, comment: '免费课程数量与名额'
      t.integer :all_appointed, comment: '总预约率'
      t.integer :free_appointed, comment: '免费预约率'
      t.integer :tuition_appointed, comment: '免费预约率'
      t.decimal :credit, comment: '应收金额'
      t.decimal :pay_credit, comment: '流水金额'
      t.decimal :actually_credit, comment: '实收金额'
      t.decimal :pay_member, comment: '支付人数'
      t.timestamps
    end
  end
end
